﻿using Basic.HrGatewayModular.Interface;
using Basic.HrRemoteModel.DeptChange;
using Basic.HrRemoteModel.DeptChange.Model;
using WeDonekRpc.Client;
using WeDonekRpc.HttpApiGateway.Model;

namespace Basic.HrGatewayModular.Services
{
    internal class DeptChangeService : IDeptChangeService
    {

        public ChangeDeptTree GetDept ( long deptId, bool? isUnit )
        {
            return new GetChangeDept
            {
                DeptId = deptId,
                IsUnit = isUnit
            }.Send();
        }

        public PagingResult<DisbandDeptEmp> Query ( PagingParam<DeptDisbandedArg> obj )
        {
            return new QueryDisbandDeptEmp
            {
                Arg = obj.Query,
                Index = obj.Index,
                IsDesc = obj.IsDesc,
                Size = obj.Size,
                SortName = obj.SortName,
                NextId = obj.NextId
            }.Send();
        }
    }
}
